package io;

import com.sun.xml.internal.fastinfoset.tools.FI_DOM_Or_XML_DOM_SAX_SAXEvent;
import org.omg.CORBA.PERSIST_STORE;

import java.io.*;

public class OosDemo
{
    public static void main(String[] args) throws IOException
    {
        String name = "王龙";
        int age = 25;
        String gender = "man";
        String[] otherInfo = new String[]{"hahaha","fat"};
        Person person = new Person(name,age,gender,otherInfo);
        System.out.println(person);
        FileOutputStream fos = new FileOutputStream("wanglong.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(person);    //  Person 必须实现Serializable接口
        System.out.println("write fininshed");
        oos.close();
        fos.close();
    }
}
